package com.cloud.school.bus.teacherhelper.protocol.privateletter;

import java.util.HashMap;

import android.content.Context;
import android.text.TextUtils;

import com.cloud.school.bus.teacherhelper.protocol.ProtocolDef;
import com.cloud.school.bus.teacherhelper.protocol.baserequest.BasePostHttpRequest;

/**
 * 发送私信
 * 
 * @author lenovo
 * 
 */
public class SendPrivateLetterRequest extends BasePostHttpRequest {

	/**
	 * 发送私信 ,发送私信当lettertype为img时必传fbody,ftime,fsize.fext
	 * 
	 * @param context
	 * @param lettertype
	 *            类型txt;img
	 * @param fbody
	 *            图片
	 * @param ftime
	 *            当前时间
	 * @param fsize
	 *            文件大小
	 * @param fext
	 *            文件格式如jpg
	 * @param content
	 *            内容
	 */
	public SendPrivateLetterRequest(Context context, String lettertype,
			String fbody, String ftime, String fsize, String fext,
			String content) {
		super(context);

		HashMap<String, String> requestMap = new HashMap<String, String>();
		if (!TextUtils.isEmpty(lettertype)) {
			requestMap.put("lettertype", lettertype);
		}
		if (!TextUtils.isEmpty(fbody)) {
			requestMap.put("fbody", fbody);
		}
		if (!TextUtils.isEmpty(ftime)) {
			requestMap.put("ftime", ftime);
		}
		if (!TextUtils.isEmpty(fsize)) {
			requestMap.put("fsize", fsize);
		}
		if (!TextUtils.isEmpty(fext)) {
			requestMap.put("fext", fext);
		}
		if (!TextUtils.isEmpty(content)) {
			requestMap.put("content", content);
		}
		setRequestParam(ProtocolDef.METHOD_Letter, requestMap);
	}

}
